#ifndef RS232PROTOCOLPACKET_H_
#define RS232PROTOCOLPACKET_H_

#include "eCommands.h"
#include "eRegisters.h"
#include "ProtocolDefinitions.h"

class CRS232ProtocolPacket
{
private:
  char cCommand[NUMBER_OF_COMMAND_BYTES];
  char cData[NUMBER_OF_DATA_BYTES];
public:
  CRS232ProtocolPacket(void);
  void getCommandBytes(char* ptrCommandBytesBack);
  void getDataBytes(char* ptrDataBytesBack);
  void setPacket(char* ptrPacketBytes);
  void getPacket(char* ptrPacketBytesBack);
  Command DecodeCommand();
  void EncodeCommand(Command Cmd);
  Register DecodeRegister();
  void EncodeRegister(Register Reg);
  int DecodeRegisterValue();
  int DecodeRegisterBit();
  void EncodeRegisterValue(int iVal);
};

#endif /* RS232PROTOCOLPACKET_H_ */
